package com.jdeng.config;

import com.jdeng.api.GoodsService;
import com.jdeng.api.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DubboConfig {

    @DubboReference(timeout = 3000)
    private GoodsService goodsService;

    @DubboReference(actives = 1) // 测试ActiveLimitFilter
    private UserService userService;

    @Bean
    public GoodsService goodsService(){
        return goodsService;
    }

    @Bean
    public UserService userService(){
        return userService;
    }
}
